<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_goods', function (Blueprint $table) {
            $table->increments('id',11)->comment('自增id');
            $table->string('goods_name',30)->comment('商品名称');
            $table->string('goods_no',20)->comment('商品货号 唯一性');
            $table->dateTime('up_time')->comment('商品上架时间');
            $table->integer('status')->comment('商品状态 0：下架 1：上架');
            $table->string('img',50)->comment('商品图片');
            $table->string('attribute',200)->comment('商品属性');
            $table->text('content')->comment('商品描述');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_goods');
    }
}
